#!/usr/bin/env bash

## configure and install minimal xfce desktop environment

## check for sudo/root
if ! [ $(id -u) = 0 ]; then
  echo "This script must run with sudo, try again..."
  exit 1
fi

cat ./xsessionrc >> /home/$SUDO_USER/.xsessionrc
chown $SUDO_USER:$SUDO_USER /home/$SUDO_USER/.xsessionrc

apt install --no-install-recommends -y \
sudo
adduser admin
addgroup admin sudo
chage --expiredate -1 root
passwd --lock root
echo "exec openbox-session" >> ~/.xinitrc
cd ..
rm -Rfv devuan_x-o_wm
ls
echo logout

